package com.yxtec.sc.web;

import com.netflix.discovery.DiscoveryClient;
import com.yxtec.sc.model.User;
import com.yxtec.sc.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by jerrie on 17-6-22.
 */
@RestController
public class UserController {

    @Autowired
    UserService userService;

    @RequestMapping(value = "/user")
    @ResponseBody
    public User get() {
//        User user = new User();
//        user.setId(1);
//        user.setName("Bot");
//        return user;
        return userService.getUser();
    }

}
